<template>
	<div style="display: flex;justify-content: center;flex-direction: column;">
		<el-form label-width="100px">
			<el-form-item v-for="(value,index,key) in PaperQuestion"
			 :key="index" :label="value.type+':'">
				
				<el-form-item v-for="(valu,index,key) in value.questions" :key="index" style="display: flex;justify-content: flex-start;margin-bottom: 10px;">
					<el-button style="width: 500px;" disabled>{{valu.title}}</el-button>
					<el-input-number v-model="valu.score"
					 placeholder="分数" style="margin-left: 10px;margin-right: 10px;"></el-input-number>
				</el-form-item>
				
				
			</el-form-item>
		</el-form>
		<div style="display: flex;justify-content: center;">
			<el-button type="primary" @click="submitForm">保存</el-button>
			<el-button type="danger" @click="cancelSubmit">取消</el-button>
		</div>


	</div>
</template>

<script>
	export default {

		data() {
			return {
				PaperQuestion: [{
						type: '单选题',
						questions: [{
								id: '1',
								score:'',
								title: '山上有几头猪'
							},
							{
								id: '2',
								score:'',
								title: '山上有几头狗'
							}
						]
					},
					{
							type: '单选题',
							questions: [{
									id: '1',
									score:'',
									title: '山上有几头猪'
								},
								{
									id: '2',
									score:'',
									title: '山上有几头狗'
								}
							]
						}

				]
			}
		},
		methods:{
			submitForm(){
				
				this.$router.push({path:'/paper/list'})
			},
			cancelSubmit(){
				
				this.$router.push({path:'/paper/list'})
			}
		}
		


	}
</script>

<style>
</style>
